﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FinanceTool.Entities.Exceptions;

namespace FinanceTool.Components
{
    public enum SourceFileType
    {
        Ing,
        Rabobank
    }

    public class SourceFileReaderFactory
    {
        public static ISourceFileReader Create(SourceFileType type, string fileLocation)
        {
            if (string.IsNullOrEmpty(fileLocation)) throw new ArgumentException("Source file location must be speficied.", "fileLocation");

            switch (type)
            {
                case SourceFileType.Ing:
                    return new IngSourceFileReader(fileLocation);
                // implement rabobank
            }
            throw new SourceFileException("SourceFileType not found.");
        }
    }
}
